From: Keir Fraser Date: Mon, 8 Feb 2010 10:18:14 +0000 (+0000) Subject: Don't scrub broken pages X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12630 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=407b049aebf00b916e2b196c444a6a79ea064fd5;p=xen.git Don't scrub broken pages Don't touch the poison pages when scrub the pages. Consuming poison page will contaminate the CPU context and may cause system crash. Signed-off-by: Jiang, Yunhong --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 0e1925a3bb..735c207e80 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1256,6 +1256,9 @@ void scrub_one_page(struct page_info *pg) { void *p = __map_domain_page(pg); + if ( unlikely(pg->count_info & PGC_broken) ) + return; + #ifndef NDEBUG /* Avoid callers relying on allocations returning zeroed pages. */ memset(p, 0xc2, PAGE_SIZE);